<?php
//+--------------------------------------------
//|描述 写文件
//|--------------------------------------------
//|Created by PhpStorm.
//| Author: DRG
//+-------------------------------------------
//|Date: 2018/5/29
//| Time: 13:22
//+--------------------------------------------
$content = date('Y-m-d H:i:s',time()).PHP_EOL;

//默认4M  超过的话有参数
swoole_async_writefile(__DIR__."/1.log",$content, function ($filename){
    
    //todo
    echo "success".PHP_EOL;
}, FILE_APPEND);
// file_put_content

echo "start".PHP_EOL;